home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
tsptp.zip
/
TSBENCH.ITF
< prev
next >
Wrap
Text File
|
1993-04-09
|
4KB
|
110 lines
(******************************************************************************)
(* TIMER.ITF *)
(* *)
(* Benchmark types and timer routines used by the TopSpeed Pascal benchmarks. *)
(* *)
(******************************************************************************)
INTERFACE UNIT TSBench;
TYPE
(*** Benchmarking types. Note that Turbo 6-byte Reals have no exact ***)
(*** equivalent in TopSpeed Pascal. The TopSpeed Emulator however, ***)
(*** support 4, 8, and 10 byte floating point reals and an 8 byte fixed ***)
(*** point real that are equivalent to the Turbo Single, Double, ***)
(*** Extended and Comp types respectively. Because of this floating ***)
(*** point benchmarks should be run on a system with a coprocessor for ***)
(*** comparison. ***)
BmInt = INTEGER; (* -214783647..214783647, signed 32-bit *)
BmReal = REAL; (* 2.03E-308..1.7E+308, 8 bytes *)
(*** Timing ***)
BmTimeT = INTEGER; (* Suitable type for max seconds *)
BmCounter = INTEGER; (* Suitable type for max loops *)
CONST
MINNULLTIME = 1; (* Null loop time in seconds *)
MINBENCHTIME = 60; (* Bench loop time in seconds, 60 is good *)
VAR
DummyVar : BOOLEAN; (* Global variable for side-effects *)
(** STARTTIMER ****************************************************************
*
* Synopsis:
*
* StartTimer;
*
* Description:
*
* StartTime starts the benchmark timer.
*)
PROCEDURE StartTimer;
(** NULLTIMESUP ***************************************************************
*
* Synopsis:
*
* NullTimesUp;
*
* Description:
*
* NullTimesUp stops the timer when the NULL timing loop is complete.
*)
FUNCTION NullTimesUp: BOOLEAN;
(** BENCHTIMESUP **************************************************************
*
* Synopsis:
*
* BenchTimesUp;
*
* Description:
*
* BenchTimesUp stops the timer when the NULL timing loop is complete.
*)
FUNCTION BenchTimesUp: BOOLEAN;
(** REPORTTIMES ***************************************************************
*
* Synopsis:
*
* ReportTimes;
*
* Description:
*
* ReportTimes reports the benchmark times and stats. Note that the
* calculated results for LoopOverhead, TotalTime and Loops per second
* are prone to any floating point errors. Therefore you may wish to
* check these results manually.
*)
PROCEDURE ReportTimes;
(** DUMMY *********************************************************************
*
* Synopsis:
*
* Dummy;
*
* Description:
*
* Dummy is a dummy procedure used to calculate the looping overhead in a
* benchmark. In order to prevent it being optimised out of existence it
* must introduce a side effect. In this case we modify the exported
* variable DummyVar.
*)
PROCEDURE Dummy;
(*# restore *)
END.